#pragma once

#include "BaseReader.h"

class CFileReader : public CBaseReader
{
public:
  CFileReader() : m_hFile(NULL)
  {}
  CFileReader(const TCHAR* szFile) : m_hFile(NULL)
  { Open(szFile); }
  ~CFileReader()
  { Close(); }

  bool Open(const TCHAR* szFile);
  void Close();

  long GetPosition() const;
  bool SetPosition(long pos);

  bool ReadLine(CString& s);

protected:
  void DetectUtf8();

protected:
  FILE* m_hFile;
};
